package module1

import (
	"context"
	"fmt"
)

func DemoCancelContext() {
	baseCtx := context.Background()
	cancelCtx, cancel := context.WithCancel(baseCtx)
	cancel()
	fmt.Println(cancelCtx.Err())
	fmt.Println(<-cancelCtx.Done())

}
